Skip to content

Add Sortformer CUDA export and Linux/Windows CUDA CI coverage#17865

Merged
larryliu0820 merged 5 commits intomainfrom
larryliu/sortformer-cuda-ci
Mar 5, 2026
Merged

Add Sortformer CUDA export and Linux/Windows CUDA CI coverage#17865
larryliu0820 merged 5 commits intomainfrom
larryliu/sortformer-cuda-ci

Conversation

@larryliu0820
Copy link
Contributor

Summary

This PR adds CUDA coverage for Sortformer in both Linux and Windows CI, and updates the Sortformer example/export path so CUDA artifacts are exportable and runnable end-to-end.

What Changed

  • Added Sortformer to CUDA export/e2e matrices in:

    • .github/workflows/cuda.yml (Linux CUDA)
    • .github/workflows/cuda-windows.yml (Windows CUDA runtime, Linux export)
  • Extended CI export/test scripts for Sortformer:

    • .ci/scripts/export_model_artifact.sh
      • Added nvidia/diar_streaming_sortformer_4spk-v2 support
      • Added Sortformer-specific export path
      • Enforced non-quantized Sortformer export
    • .ci/scripts/test_model_e2e.sh
      • Added Sortformer model routing, test audio download, and runner invocation
    • .ci/scripts/test_model_e2e_windows.ps1
      • Added Sortformer runner path/args and expected-output validation
  • Enabled Sortformer CUDA build targets:

    • examples/models/sortformer/CMakePresets.json
      • Added sortformer-cuda configure/build/workflow presets
    • Makefile
      • Added sortformer-cuda target and help text
  • Updated Sortformer runner to accept CUDA named-data blob:

    • examples/models/sortformer/main.cpp
      • Added --data_path
    • examples/models/sortformer/sortformer_runner.h/.cpp
      • Added constructor overload/path handling for optional .ptd
  • Updated Sortformer exporter for CUDA backends:

    • examples/models/sortformer/export_sortformer.py
      • Added backend choices: cuda, cuda-windows
      • Added CUDA/CUDA-Windows lowering path
      • Writes external tensor data via write_tensor_data_to_file(output_dir)
      • Verifies aoti_cuda_blob.ptd exists in output dir
      • Added explicit print for blob write location

Validation

  • python -m py_compile examples/models/sortformer/export_sortformer.py
  • CI coverage is now wired for:
    • Linux CUDA export + e2e Sortformer
    • Windows CUDA e2e Sortformer (using exported artifact)

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 5, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17865

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 New Failures, 13 Pending, 4 Unrelated Failures

As of commit 6db4e02 with merge base 2dd9034 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 5, 2026
@larryliu0820 larryliu0820 added the release notes: desktop for desktop/laptop workstream label Mar 5, 2026
@Gasoonjia
Copy link
Contributor

please update sortformer readme for cuda support. Also highlight that we should use python >= 3.11 when working on sortformer model

@larryliu0820
Copy link
Contributor Author

please update sortformer readme for cuda support. Also highlight that we should use python >= 3.11 when working on sortformer model

Done

@larryliu0820 larryliu0820 temporarily deployed to upload-benchmark-results March 5, 2026 02:37 — with GitHub Actions Inactive
@larryliu0820 larryliu0820 had a problem deploying to upload-benchmark-results March 5, 2026 19:09 — with GitHub Actions Failure
@larryliu0820 larryliu0820 temporarily deployed to upload-benchmark-results March 5, 2026 22:19 — with GitHub Actions Inactive
@larryliu0820 larryliu0820 merged commit e06a3d7 into main Mar 5, 2026
360 of 372 checks passed
@larryliu0820 larryliu0820 deleted the larryliu/sortformer-cuda-ci branch March 5, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: desktop for desktop/laptop workstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants